{% for question in page_data.items %}
    <div class="qa-item">
    {#            点击问题详情，进入到问题页详情#}
      <a href="{{ url_for('qa.detail',q_id=question.id) }}" class="title">{{ question.title }}</a>
      <div class="desc">
    {#                  当有图片的时候，才把图片展示出来#}
          {% if question.img %}
        <div class="left">
          <img src="{{ question.get_img_url }}" alt="" srcset="">
        </div>
          {% endif %}
        <div class="right">
    {#                    使用过滤器，如果空值是真，才返回default的内容#}
          <div class="show-desc">{{ question.desc|d('暂无内容',true) }}
            <span class="more">阅读原文<i class="glyphicon glyphicon-menu-down"></i></span>
          </div>
          <div class="show-all hidden">
    {#                      转义html的内容 #}
              {% autoescape false %}
              {{ question.content|safe }}
              {% endautoescape %}
            <span class="more">收起<i class="glyphicon glyphicon-menu-up"></i></span>
          </div>
        </div>
      </div>
      <div class="qa-footer">
        <div>
          <button type="button" class="btn btn-info btn-sm">关  注</button>
        </div>
    {#                  通过数据库拿到评论的数据#}
        <div class="txt-menu"><i class="glyphicon glyphicon-comment"></i>{{ question.comment_count|d('0',true) }}</div>
        <div class="txt-menu"><i class="glyphicon glyphicon-send"></i>分享</div>
        <div class="txt-menu"><i class="glyphicon glyphicon-flag"></i>举报</div>
        <div class="txt-menu btn-group">
          <i class="glyphicon glyphicon-option-horizontal dropdown-toggle" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false"></i>
          <ul class="dropdown-menu">
            <li><a href="#">不感兴趣</a></li>
          </ul>
        </div>
      </div>
    </div>
{% endfor %}